var express = require('express');
var router = express.Router();
const { createLogs,toObtainLogs,timeSearchLogs} = require("../service/logsService")

/* GET home page. */
//创建日志
router.post('/createLogs',async function (req, res, next) {
    const data = await createLogs(req.body)
    res.send(data)
});

//获取日志和搜索
router.get('/toObtainLogs',async function(req,res,next){
 const data=req.query
 const get= await toObtainLogs(data)
 res.send(get)
})


module.exports = router;
